/* 成就系统专用样式文件 */

/* 页面头部 */
.page-header {
    text-align: center;
    margin: 2rem 0 3rem 0;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.page-title {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-title i {
    margin-right: 0.5rem;
    color: #ffd700;
}

.page-description {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.6;
}

/* 登录提示 */
.login-notice {
    background-color: rgba(245, 101, 101, 0.1);
    color: var(--color-text);
    padding: 2rem;
    border-radius: 16px;
    border-left: 4px solid var(--color-error);
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(245, 101, 101, 0.1);
}

.notice-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.notice-content i {
    font-size: 2rem;
    color: var(--color-error);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.notice-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-error);
}

.notice-text p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-text-light);
}


/* 成就统计 */
.achievement-stats {
    margin: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--color-primary);
}

.stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-content p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* 成就容器 */
.achievements-container {
    margin: 3rem 0;
}

.section-title {
    font-size: 1.8rem;
    margin: 0 0 2rem 0;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--color-primary);
}

/* 成就网格 */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.achievement-card.unlocked {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f9e8 100%);
}

.achievement-card.locked {
    opacity: 0.7;
    background: #f8f9fa;
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.achievement-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.achievement-content {
    text-align: center;
}

.achievement-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.achievement-card.unlocked .achievement-name {
    color: #28a745;
}

.achievement-description {
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.achievement-requirement {
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
    display: inline-block;
}

.achievement-card.unlocked .achievement-requirement {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.achievement-date {
    color: var(--color-text-light);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.achievement-locked {
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
}

.achievement-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #28a745;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* 成就指南 */
.achievement-guide {
    margin: 3rem 0;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid var(--color-primary);
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.guide-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.guide-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--color-text);
    text-align: center;
}

.guide-card p {
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.guide-requirement {
    background: linear-gradient(135deg, #e3f2fd 0%, #e1f5fe 100%);
    color: var(--color-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-requirement i {
    color: #28a745;
}

/* 学习建议 */
.learning-tips {
    margin: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 16px;
}

.tips-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tip-item i {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.tip-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.tip-item p {
    margin: 0;
    color: var(--color-text-light);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .page-header {
        margin: 1.5rem 0 2rem 0;
        padding: 1.5rem 1rem;
    }

    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .notice-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .achievement-card {
        padding: 1rem;
    }

    .achievement-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .achievement-name {
        font-size: 1.1rem;
    }
    
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .guide-card {
        padding: 1rem;
    }
    
    .tips-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tip-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.75rem;
    }

    .learning-tips {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .page-header {
        margin: 1rem 0 2rem 0;
        padding: 1.5rem 1rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 深色主题适配 */
body.dark-theme .login-notice {
    background-color: rgba(245, 101, 101, 0.15);
    border-left: 4px solid var(--color-error);
}

body.dark-theme .stat-card {
    background-color: #2d3748;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.dark-theme .achievement-card {
    background-color: #2d3748;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.dark-theme .achievement-card.unlocked {
    background: linear-gradient(135deg, #1a2e1a 0%, #2d4a2d 100%);
}

body.dark-theme .achievement-card.locked {
    background-color: #4a5568;
}

body.dark-theme .guide-card {
    background-color: #2d3748;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

body.dark-theme .tip-item {
    background-color: #2d3748;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-theme .learning-tips {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

/* 成就通知动画 */
@keyframes achievementGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8); }
}

.achievement-card.newly-unlocked {
    animation: achievementGlow 2s ease-in-out infinite;
    border-color: #ffd700 !important;
}

/* 加载动画 */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

body.dark-theme .loading-shimmer {
    background: linear-gradient(90deg, #2d3748 25%, #4a5568 50%, #2d3748 75%);
    background-size: 200% 100%;
}

/* 成就进度条 */
.achievement-progress {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.achievement-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

body.dark-theme .achievement-progress {
    background-color: #4a5568;
}
